//package com.ftg.learn;
//
//import com.alibaba.dashscope.aigc.imagesynthesis.ImageSynthesis;
//import com.alibaba.dashscope.aigc.imagesynthesis.ImageSynthesisParam;
//import com.alibaba.dashscope.aigc.imagesynthesis.ImageSynthesisResult;
//import com.alibaba.dashscope.exception.ApiException;
//import com.alibaba.dashscope.exception.NoApiKeyException;
//import com.alibaba.dashscope.utils.Constants;
//
//import java.util.HashMap;
//import java.util.Map;
//
///**
// * @author 布衣
// */
//public class CreateImageReBuild {
//
//    public static void main(String[] args) throws NoApiKeyException, ApiException, InterruptedException {
//        Constants.apiKey="sk-510b917932744b3680b858b474fbd919";
//        Constants.baseHttpApiUrl="https://dashscope.aliyuncs.com/api/v1/services/aigc/image-generation/generation";
//
//        // 使用ImageSynthesis类
//        ImageSynthesis imageSynthesis = new ImageSynthesis();
//
//        // 构建参数，使用正确的参数设置方法
//        ImageSynthesisParam param = ImageSynthesisParam.builder()
//                .model("wanx-style-repaint-v1")
//                .style("8")
//                .prompt("a cat")
//                .baseImageUrl("https://public-vigen-video.oss-cn-shanghai.aliyuncs.com/public/dashscope/test.png")
//                .build();
//
//        // 发起调用
//        ImageSynthesisResult result = imageSynthesis.call(param);
//
//        System.out.println(result);
//    }
//}
